home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / MW MPW Binaries 1.1.1a2 / mwcPPC / MWCIncludes / IOCtl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-31  |  1.8 KB  |  67 lines  |  [TEXT/MMCC]

  1. /*
  2.     IOCtl.h -- Device-handler-specific requests
  3.  
  4.     Warning:  This interface is NOT a part of the ANSI C standard.
  5.              We do NOT claim to be POSIX compliant.
  6.              If you want your code to be portable, don't use this interface.
  7.  
  8.     Copyright, Apple Computer Inc. 1985-1991
  9.     All rights reserved.
  10.  
  11.     This file is used in these builds: ROM System
  12.  
  13.     Change History (most recent first):
  14.  
  15.          <6>      8/8/91    JL        Update copyright
  16.          <5>     6/17/91    JL        Checked in MPW 3.2ƒ version.  Changed __safe_link to
  17.                                     __cplusplus.
  18.  
  19.     To Do:
  20. */
  21.  
  22. # ifndef __IOCTL__
  23. # define __IOCTL__
  24.  
  25. /*
  26.  *        ioctl() function prototype
  27.  */
  28.  
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif
  32.  
  33. int ioctl(int fildes, unsigned int cmd, long *arg);
  34.  
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38.  
  39. /*
  40.  *   IO Control commands.
  41.  *
  42.  *   IOCTLs which begin with "FIO" are controls which are general
  43.  *          (device driver) control requests.  They may be executed by 
  44.  *         the top-level ioctl() procedure, or previewed by it before 
  45.  *         passing it on to the driver xxIoctl()s.
  46.  */
  47.  
  48. # define FIOLSEEK         (('f'<<8)|0x00)     /* Apple internal use only */
  49. # define FIODUPFD         (('f'<<8)|0x01)     /* Apple internal use only */
  50.  
  51. # define FIOINTERACTIVE (('f'<<8)|0x02)     /* If device is interactive */
  52. # define FIOBUFSIZE        (('f'<<8)|0x03)     /* Return optimal buffer size */
  53. # define FIOFNAME         (('f'<<8)|0x04)     /* Return filename */
  54. # define FIOREFNUM        (('f'<<8)|0x05)     /* Return fs refnum */
  55. # define FIOSETEOF        (('f'<<8)|0x06)     /* Set file length */
  56.  
  57. /*
  58.  *   IOCTLs which begin with "TIO" are for TTY (i.e., console or 
  59.  *         terminal-related) device control requests.
  60.  */
  61.  
  62. # define TIOFLUSH   (('t'<<8)|0x00)        /* discard unread input.  arg is ignored */
  63. # define TIOSPORT   (('t'<<8)|0x01)        /* Obsolete -- do not use */
  64. # define TIOGPORT   (('t'<<8)|0x02)        /* Obsolete -- do not use */
  65.  
  66. # endif /*__IOCTL__*/
  67.